uniform sampler2D depthImg;

float LinearizeDepth(float zoverw){
	float n = 1.0;
	float f = 2048.0;
	return(2.0 * n) / (f + n - zoverw * (f - n));
}

void main(void){

	float depth = LinearizeDepth(texture2D(depthImg, gl_TexCoord[0].st).r)*1.0;
	gl_FragColor = vec4(depth,depth,depth,depth);
	
}
